<script>
import { ref, reactive, h } from "vue";
import Home from "./components/Home.vue";

export default {
    setup() {
        const count = ref(0)

        return () => h('div', null,
            [
                h('h1', null, '新页面'),
                h(Home, null, { default: () => h('div', null, '父组件传递进入Home的数据') }),
                h('span', { style: { 'margin-right': '10px' } }, `count is: ${count.value}`),
                h('button', { style: { 'margin-right': '5px' }, onClick: () => count.value++ }, '+1'),
                h('button', { onClick: () => count.value-- }, '-1')
            ]
        )
    }
}
</script>
